Keycloak REST Services 1.5.0-Final

Path: / admin / realms / {realm}

Get the top-level representation of the realm. It will not include nested information like User and Client representations.

Path parameters:
realm - realm name (not id!)

Sub-Resources
Resources
NameDescription
admin-eventsQuery admin events.
attack-detection
attack-detection/brute-force/usernames
Clear any user login failures for all users.
authentication
client-session-statsReturns a JSON map.
clientsList of clients belonging to this realm.
eventsQuery events.
identity-provider
logout-allRemoves all user sessions.
push-revocationPush the realm's revocation policy to any client that has an admin url associated with it.
rolesList all roles for this realm or client
roles-by-id
roles-by-id/{role-id}
Get a specific role's representation
sessions
sessions/{session}
Remove a specific user session.
testLDAPConnection
user-federation
usersQuery list of users.

Resource Methods
Method Summary
NameDescription
GET /admin/realms/{realm}Get the top-level representation of the realm.
PUT /admin/realms/{realm}Update the top-level information of this realm.
DELETE /admin/realms/{realm}Delete this realm.

Method Detail

GET /admin/realms/{realm}

Get the top-level representation of the realm. It will not include nested information like User and Client representations.

HTTP Example:
GET /admin/realms/{realm}
API Example:

RealmAdminResource.getRealm({'realm': /* name realm name (not id!) */});

Output:
RealmRepresentation -
Produces:
application/json

PUT /admin/realms/{realm}

Update the top-level information of this realm. Any user, roles or client information in the representation will be ignored. This will only update top-level attributes of the realm.

HTTP Example:
PUT /admin/realms/{realm}
API Example:

RealmAdminResource.updateRealm({'realm': /* name realm name (not id!) */,
  '$entity': /* rep */});

Input:
RealmRepresentation
Output:
Response -
Consumes:
application/json

DELETE /admin/realms/{realm}

Delete this realm.

HTTP Example:
DELETE /admin/realms/{realm}
API Example:

RealmAdminResource.deleteRealm({'realm': /* name realm name (not id!) */});

Output:
void

Keycloak REST Services 1.5.0-Final